<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<jsp:directive.page import="com.anhry.app.safety.manage.system.bean.TbUserDept"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>个人提醒管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/selected.js"></script>
	<script src="<%=basePath%>/js/oa.js" type="text/javascript"></script>
   	<script type="text/javascript" src="<%=basePath%>/js/dbdialog/lhgdialog.min.js<%=Util.LHGDIALOG%>"></script>
	<script src="<%=basePath%>/js/table.js" type="text/javascript"></script>
	<script src="<%=basePath%>/js/checkbox1.js" type="text/javascript"></script>
	<script type="text/javascript" src="<%=basePath%>/js/My97DatePicker/WdatePicker.js" defer="defer"></script><base target="_self" />
	<script>
		$(function(){
			initSelArray('cUnit:1','cDept:1');
			var cGrade = '${cGrade}';
			var cUnit = '${cUnit}';
			var cDept = '${cDept}';
			if(null!=cGrade && cGrade!=""){
				changeGrade(cGrade);
			}
	   		if(cUnit!=null && cUnit!=""){
	   			changeUnit(cUnit);
	   			selected('cUnit',cUnit);	//加载选中部门
	   		}
	   		if(cDept!=null && cDept!=""){
	   			selected('cDept',cDept);	//加载选中单位
	   		}
	   		
	   		$('#clean').click(
	   			function(){
	   			
	   			$('#time1').val('');
	   			$('#time2').val('');
	   			$('#keyWord').val('');
	   			$('#keyUser').val('');
	   			$('#callTypes').val('');
	   			$('#cGrade').val('');
	   			$('#cUnit').val('');
	   			$('#cDept').val('');
	   			$('#cRole').val('');
	   			
	   			
	   			
	   		});
	   		
		});
		
		function changeGrade(rid){
	   		var urls='<%=basePath%>/admin/sys_loadDept.action?gradeId='+rid
	   		buildSelect(rid, 'cUnit',urls,'1');
	   	}
	   	function changeUnit(uid){
	   		var rid=document.getElementById("cGrade").value;
	   		var urls="<%=basePath%>/admin/sys_loadDept.action?unitId="+uid+"&gradeId="+rid;
	   		buildSelect(uid, 'cDept',urls,'1');
	   	}
	   	function opdlg(uid){
		   	$.dialog({id:'userInfo',title:'用户信息查看',width:540,height:300,max: false,min: false,content: 'url:<%=path%>/admin/sys_userShow.action?objId='+uid+'',
			   	cancelVal: '关闭',
			   	cancel: true /*为true等价于function(){}*/
			});
		}
	</script>
  </head>
  
  <body>
  	<div class="body-box">
  		<div class="map">
			<div class="map_con">
				您当前的位置：系统提醒 &gt; 个人提醒管理&gt; 提醒汇总列表
			</div>
		</div>
		<div id="container">			
			<div class="top_search">
			    <fieldset >
			    	<legend>
				  		<div class="search">查询条件</div>
				  	</legend>
				    <form action="<%=basePath%>/oa/call_callList.action?search=1" method="post">
				    	<input type="hidden" name="forward" value="0">
				    	提醒时间：<input style="margin-left:18px;" name="beginTime" id="time1" class="Wdate" type="text" value="${beginTime }" readonly="readonly" onClick="WdatePicker({maxDate:'#F{$dp.$D(\'time2\')}'})"/>--<input name="endTime" id="time2" class="Wdate" readonly="readonly" type="text" value="${endTime }" onClick="WdatePicker({minDate:'#F{$dp.$D(\'time1\')}'})"/><br/>
				    	提醒人单位：
			   			<s:select list="gradeList" name="cGrade"  listKey="id" listValue="gradeName" headerKey="" headerValue="请选择" theme="simple" cssStyle="width:155px;" id="cGrade" onchange="changeGrade(this.value);"></s:select>
			   			<s:select list="#{}" name="cUnit"  headerKey="" headerValue="请选择" theme="simple" cssStyle="width:155px;margin-left:13px;" id="cUnit" onchange="changeUnit(this.value);"></s:select>
			   			<s:select list="#{}" name="cDept" headerKey="" headerValue="请选择" theme="simple" cssStyle="width:155px;margin-left:13px;" id="cDept"></s:select>
			   			<br/>
				    	提醒机制：<s:select cssStyle="margin-left:18px; width:155px;margin-right:15px;" list="#{0:'消息',1:'手机短信',2:'消息+手机短信'}" listKey="key" listValue="value" theme="simple"  name="callTypes" id="callTypes" headerKey="" headerValue="请选择"></s:select>
				    	提醒内容：<input type="text" name="keyWord" id="keyWord" value="${keyWord}"><br/>
				    	提醒人角色：<s:select list="roleList" name="cRole" id="cRole" listKey="id" listValue="roleName" headerKey="" headerValue="请选择" theme="simple" cssStyle="width:155px; margin-left:6px;margin-right:15px;"></s:select>
				    	提醒人：<input style="margin-left:17px;" type="text" name="keyUser" id="keyUser" value="${keyUser}">
				    	<input type="submit" value="搜 索" class="link_input" name="btnsx">
				    	<input type="button" value="清 空" class="link_input" name="clean" id="clean">
				    </form>
				</fieldset>
			</div>			
		    <table border="0" cellpadding="0" cellspacing="0" class="mytable">
		    	 <tr class="fixedHeaderTr">
		    		<th width="5%">序列</th>
		    		<th width="45%">提醒内容</th>
		    		<th width="10%">提醒时间</th>	    		   		
		    		<th width="10%">提醒机制</th>	    		
		    		<th width="10%">提醒人</th>	    		
		    		<th width="10%">单位名称</th>	    			    		
		    		<th width="10%">部门名称</th>	    		
		    	</tr>
		    	<s:if test="%{perCallList.size>0}">
		    		<s:iterator value="perCallList" id="call" status="x">
				    	<tr>			    		
				    		<td align="center">${x.index+1+(page.num-1)*page.size}</td>			    		
				    		<td align="center"><a href="<%=basePath%>/oa/call_callShow.action?id=${call.id}&keyWord=${keyWord}&beginTime=${beginTime }&endTime=${endTime }&userUnit=${userUnit }&userDept=${userDept }&num=${page.num }&size=${page.size}&keyUser=${keyUser }">${call.callContent}</a></td>
				    		<td align="center"><s:date name="#call.callTime" format="yyyy-MM-dd HH:mm"/> </td>				    		
				    		<td align="center">
				    			<s:if test="%{#call.callType==0}">消息</s:if>
								<s:elseif test="%{#call.callType==1}">手机短信</s:elseif>
								<s:elseif test="%{#call.callType==2}">消息+手机短信</s:elseif>
				    		</td>				    		
				    		<td align="center">${call.tbUser.userRealName }</td>				    		
				    		<td align="center">${call.tbUser.tbUserUnit.deptName }</td>				    					    		
				    		<td align="center">${call.tbUser.tbUserDept.deptName }</td>				    		
				    	</tr>
		    		</s:iterator>
			    </s:if>
			    <s:else>
			    	<tr><td colspan="7">没有数据</td></tr>
			    </s:else>
		    </table>
		    <div class="page">
		    	<jsp:include flush="true" page="../share/fenye.jsp">
				    <jsp:param name="url4page" value="/oa/call_callList.action?keyWord=${keyWord}&beginTime=${beginTime }&endTime=${endTime }&keyUser=${keyUser }&userUnit=${userUnit }&userDept=${userDept }" />
			    </jsp:include>
		    </div>	    
		</div>
		<div class="right_bottom">
			<div style="width:11px;float:left"><img src="<%=basePath%>/images/right_bottom.gif"/></div>
			<div style="width:16px;float:right"><img src="<%=basePath%>/images/right_rbottom.gif"/></div>
		</div>
	</div>
  </body>
</html>
